package src;

import java.util.Collections;
import java.util.Vector;

public class SaveObject implements Comparable<SaveObject>{

	double time;
	int key;

	public SaveObject(double time, int key){
		this.time = time;
		this.key = key;
	}

	



	public static void main(String[] args) {
		Vector<SaveObject> v =  new Vector<SaveObject>();

		v.add(new SaveObject(13020.705078125,4));
		v.add(new SaveObject(5497.630859375,7));
		v.add(new SaveObject(22569.22265625,4));
		v.add(new SaveObject(1.548,9));

		Vector<SaveObject> v2 =  new Vector<SaveObject>();

		v2.add(new SaveObject(10995.26171875,4));
		v2.add(new SaveObject(50.548,7));
		v2.add(new SaveObject(180.548,4));
		v2.add(new SaveObject(10.548,9));

		Vector<SaveObject> v3 =  new Vector<SaveObject>();
		v3.addAll(v);
		v3.addAll(v2);

		Collections.sort(v3);

		/*for (SaveObject saveObject : v3) {
			System.out.println(saveObject.time);
		}*/

		int d  = (int)500090.22265625;
		String s = d + "";

		int total = 7 - s.length();
		for(int i = 0; i < total; i++){
			s = "0" + s;
		}

		System.out.println(s);
	}

	public double getTime() {
		return time;
	}

	public int getKey() {
		return key;
	}





	public int compareTo(SaveObject o) {
		if(this.time < o.time){
			return -1;
		}
		else if(this.time > o.time){
			return 1;
		}
		else{
			return 0;
		}
	}
}
